<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/component/commonTagLib.jsp" %>
<!DOCTYPE html>
<html>
<head>
<title>预约详情</title>
 <%@ include file="/WEB-INF/component/commonCSS.jsp" %>
<!--[if lt IE 9]>
        <script src="lib/js/html5shiv.min.js"></script>
        <script src="lib/js/respond.min.js"></script>
    <![endif]-->
 <style type="text/css">

</style>
</head>
<body class="skin-blue-light sidebar-mini fixed skin-blue-light-frame">
	<section class="content-header">
		<h1>预约规则详情</h1>
		<ol class="breadcrumb">
			<li><a href="${ctx}/home.jsp"><i class="fa fa-home"></i>首页</a></li>
			<li class="active">药品招标管理</li>
            <li class="active">预约管理</li>
		</ol>
	</section>

	<section class="content">
		<div class=" box box-success">
			<div class="box-body" style="padding-left:300px;padding-top:20px;background:url('${ctx }/lib/img/subscribedetail.png') no-repeat 120px 50px;">
				<form role="form" class="form-horizontal" id="FormSubmit" action="" method="post">
					<div>
						<input style="width: 220px;" id="bidSubscribeId" name="bidSubscribeId" type="hidden" value="${list.bidSubscribeId }">
					   <label style="margin-left: 45px;">项目名称：</label>
					   <c:out value="${list.projName }"></c:out>
					   <br></br>
					   <label  for="txtDrugName" style="margin-left: 45px;" >预约日期：</label>
					   <c:out value="${list.subStartDateStr}"></c:out>
                   	   <label>-</label>
                   	   <c:out value="${list.subEndDateStr}"></c:out>
                       <br></br>
					   <label  for="txtDrugName" style="margin-left: 25px;">是否包含周末：</label>
					   <c:out value="${list.includeWeekend == 1?'是':'否'}"></c:out>
                   	   <br></br>
					   <label  for="txtDrugName"style="margin-left: 50px;">上午时间：</label>
					   <c:out value="${list.processStartTimeOneStr}"></c:out>
                       <label>-</label> 
                       <c:out value="${list.processEndTimeOneStr}"></c:out>
                       <c:out value="每${list.processUnitOne}分钟接待( ${list.personCountOne}  ) 人 "></c:out>
                       <br></br>
                       <label  for="txtDrugName" style="margin-left: 50px;">下午时间：</label>
					   <c:out value="${list.processStartTimeTwoStr}"></c:out>
                       <label>-</label> 
                       <c:out value="${list.processEndTimeTwoStr}"></c:out>
                       <c:out value="每${list.processUnitTwo}分钟接待( ${list.personCountTwo}  ) 人 "></c:out>
                       <input type="hidden" id="isEnable" name="isEnable" value="${list.isEnable }">
				</div>
				 
                </form>
			</div>
			<div class="box-footer text-center">
                    <button type="button" onclick="stop(2);" class="btn btn-success btn-sm">关&nbsp;闭</button>
                     <c:if test="${defalutProjId == null}">
                    	<button type="button" onclick="back();" class="btn btn-danger btn-sm">返&nbsp;回</button>
                    </c:if>
                     <c:if test="${defalutProjId != null}">
                    </c:if>
                    <c:if test="${defalutProjId != null && isEnable == 0}">
                    	<button type="button" onclick="edit();" class="btn btn-default btn-sm">編&nbsp;辑</button>
                    	<button type="button" onclick="look();" class="btn btn-default btn-sm">查&nbsp;看</button>
                    </c:if>
                    <c:if test="${defalutProjId != null && isEnable != 0}">
                    	<button type="button" onclick="look();" class="btn btn-default btn-sm">查&nbsp;看</button>
                    </c:if>
                </div>
		</div>
		
	</section>
   <%@ include file="/WEB-INF/component/commonJS.jsp" %>
    <script src="${ctx}/lib/plugins/daterangepicker/moment.js"></script>
    <script src="${ctx}/lib/plugins/daterangepicker/daterangepicker.js"></script>
	<script type="text/javascript">
	
		function stop(obj){
			var bidSubscribeId = $("#bidSubscribeId").val();
			if($("#isEnable").val()==2){
				$.alert("该预约已关闭！", "warn");
				return ;
			}
			$.HN.message
			.confirm('确定关闭预约吗？', '', '')
			.on(
					function(e) {
						if (e) {
							$.ajax({
										type : "POST",
										url : "${ctx}/bidSubscribe/toSubscribeStatusUpdate.html",
										data : "bidSubscribeId="
												+ bidSubscribeId+","
												+ "&isEnable="+obj,
										dataType:"json",
										success : function(result) {
											if(result.success){
												$.HN.message.alert('操作成功！','信息', 'success');
												window.location.href="${ctx}/bidSubscribe/toSetSubProjListJsp.html";
											}else{
												$.HN.message.alert('操作失败！','信息', 'error');
											}
										}
									});
						}
					});
		}
		
		function back(){
			window.location.href="${ctx}/bidSubscribe/toSetSubProjListJsp.html";
		}
		function edit(){
			var bidSubscribeId = $("#bidSubscribeId").val();
			window.location.href="${ctx}/bidSubscribe/toSubscribeEditJsp.html?bidSubscribeId="+bidSubscribeId;
		}
		function look(){
			var bidSubscribeId = $("#bidSubscribeId").val();
			window.location.href="${ctx}/bidSubscribe/toCompRecordJsp.html?projId=${defalutProjId}"+"&bidSubscribeId="+bidSubscribeId;
		}
	</script>
</body>
</html>









